import { Routes, Route,Navigate } from "react-router-dom";
import Father from "../view/father/father"
import Children from "../view/children/children"
import Home from "../view/home/home"
import Index from "../view/index/index"
export default function MyRouter(){
    return(
        <Routes >
            <Route path="/children" element={<Children/>}/>
            <Route path="/father" element={<Father/>} />
            <Route path="/home" element={<Home/>} />
            <Route path="/index" element={<Index/>} />
            {/* router6的路由重定向写法 */}
            <Route path="/children" element={<Navigate to="/children" replace/>} />
        </Routes >
    )
}